#include <stdio.h>
#include <stdlib.h>
#include "libs/lambda.h"

int main(int argc, char** argv) {
    
    BoundingBox b;
    b.vertex[0] = (Voxel){0,2,0};
    b.vertex[1] = (Voxel){2,2,0};
    b.vertex[2] = (Voxel){0,2,2};
    b.vertex[3] = (Voxel){2,2,2};
    b.vertex[4] = (Voxel){0,0,0};
    b.vertex[5] = (Voxel){2,0,0};
    b.vertex[6] = (Voxel){0,0,2};
    b.vertex[7] = (Voxel){2,0,2};
    
    Voxel v1 = newVoxel(1,1,1);
    Voxel v2 = newVoxel(3,3,3);
    
    if(isInside(v1, b)) {
        printf("voxel 1 is inside bounding box.\n");
    } else {
        printf("voxel 1 is outside bounding box.\n");
    }
    
    if(isInside(v2, b)) {
        printf("voxel 2 is inside bounding box.\n");
    } else {
        printf("voxel 2 is outside bounding box.\n");
    }
    
    printf("Voxels 1 and 2 have a distance of %f.\n", distance(v1, v2));
    
    printf("Monte Carlo approximation for N = %d yields %f.\n", 6, MC(6));
    
    return (EXIT_SUCCESS);
}